<%@ page language="java" contentType="text/html; charset=UTF-8"	 pageEncoding="UTF-8"%>
<%@ include file="../include/laypublic.jsp"%>
<!DOCTYPE html>
<html>
<head>
</head>
  <title>公司管理</title>
  <style type="text/css">
  	.layui-form-select dl{
		max-height: 150px; // 原值为300，调节高度建议为50的倍数
	}
	.layui-form-label{width: 130px;}
	.layui-form-item {
	    margin-bottom: 5px;
	    clear: both;
	    *zoom: 1;
	}
  </style>
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-card">
      <!-- 查询区域  -->
      <div id="query-form" class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">公司名称</label>
            <div class="layui-input-inline">
              <input type="text" name="compName" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
          </div>
			<div class="layui-inline">
				<label class="layui-form-label">日期</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input" id="orginfo-laydate-dates" name="dates" readonly
						   placeholder="请选择创建时间">
				</div>
			</div>
          <div class="layui-inline">
            <label class="layui-form-label">公司类型</label>
            <div class="layui-input-inline">
              <select name="types">
              	<option value="">请选择-公司类型</option>
              	<option value="1">总部公司</option>
              	<option value="2">区域公司</option>
              	<option value="3">项目公司</option>
              </select>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
              <infopub:select id="query-form-state" entireName="-状态" name="state" type="dic" groupNo="A00010020"></infopub:select>
            </div>
          </div>
          <shiro:hasPermission name="LIST_ORG">
	          <div class="layui-inline">
	            <button class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="LAY-org-search">
	              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
	            </button>
	            <button class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="LAY-user-back-reset">
	              <i class="layui-icon layui-icon-fonts-clear  layuiadmin-button-btn"></i>重置
	            </button>
	          </div>
          </shiro:hasPermission>
        </div>
      </div>
  	  <!-- 按钮区域  -->
      <div class="layui-card-body">
        <div style="padding-bottom: 10px;">
          <shiro:hasPermission name="SAVE_ORG">
          	<button class="layui-btn layuiadmin-btn-admin " data-type="add">
          	 	<i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>新增
          	</button>
          </shiro:hasPermission>
        </div>
        <!-- 数据表单 -->
        <table id="LAY-org-manage" lay-filter="LAY-org-manage"></table>

        <div class="layui-form" lay-filter="add_form" id="add_form" style="padding: 20px 30px 0 0;display:none">
		    <div class="layui-form-item">
		    	<div class="layui-inline">
			      	<label class="layui-form-label">公司名称</label>
			      	<div class="layui-input-inline">
			        	<input type="text" name="compName" maxlength="50" lay-verify="required|CHS" onblur="checkCompName(this);" placeholder="请输入公司名称" autocomplete="off" class="layui-input">
			      	</div>
		      	</div>
		    </div>
		    <div class="layui-form-item">
		    	<div class="layui-inline">
		    		<label class="layui-form-label">法人姓名（选填）</label>
		      		<div class="layui-input-inline">
		        		<input type="text" name="legalPerson" maxlength="50" onblur="verify(this,'CHS')" placeholder="请输入法人姓名" autocomplete="off" class="layui-input">
		      		</div>
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <div class="layui-inline">
			    	<label class="layui-form-label">公司类型</label>
			    	<div class="layui-input-inline">
				   		<select name="types" id="add_selectTypes" lay-filter="add_chooseParentComp" lay-verify="required">
		              		<option value="">请选择-公司类型</option>
		              		<option value="1">总部公司</option>
		              		<option value="2">区域公司</option>
		              		<option value="3">项目公司</option>
	              		</select>
			    	</div>
		    	</div>
		   </div>
		   <div class="layui-form-item">
			    <div class="layui-inline">
			    	<label class="layui-form-label">上级公司</label>
				    <div class="layui-input-inline">
						<select name="parentId" id="add_selectParentComp" lay-search>
						</select>
				    </div>
			    </div>
		  	</div>
		    <div class="layui-form-item" id="proCodeDiv" style="display:none">
		      	<label class="layui-form-label">关联项目（选填）</label>
		      	<div class="layui-input-inline">
		      		<select id="add_selectProCode" name="projectCode" lay-search>
					</select>
		      	</div>
		    </div>
		    <div class="layui-form-item layui-hide">
		      	<input type="button" lay-submit lay-filter="add_form_submit" id="add_form_submit" value="确认">
		    </div>
	  	</div>

	  	<!-- 编辑窗口 -->
        <div class="layui-form" lay-filter="edit_form" id="edit_form" style="padding: 20px 30px 0 0;display:none">
        	<input type="hidden" name="id" id="editAccountId" />
		    <div class="layui-form-item">
		    	<div class="layui-inline">
			      	<label class="layui-form-label">公司名称</label>
			      	<div class="layui-input-inline">
			        	<input type="text" name="compName" maxlength="50" lay-verify="required|CHS" onblur="checkNewCompName(this);" placeholder="请输入公司名称" autocomplete="off" class="layui-input">
			      	</div>
		      	</div>
		    </div>
		    <div class="layui-form-item">
		    	<div class="layui-inline">
		    		<label class="layui-form-label">法人姓名（选填）</label>
		      		<div class="layui-input-inline">
		        		<input type="text" name="legalPerson" maxlength="50" onblur="verify(this,'CHS')" placeholder="请输入法人姓名" autocomplete="off" class="layui-input">
		      		</div>
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <div class="layui-inline">
			    	<label class="layui-form-label">公司类型</label>
			    	<div class="layui-input-inline">
				   		<select name="types" id="edit_selectTypes" lay-filter="edit_chooseParentComp" lay-verify="required">
		              		<option value="">请选择-公司类型</option>
		              		<option value="1">总部公司</option>
		              		<option value="2">区域公司</option>
		              		<option value="3">项目公司</option>
	              		</select>
			    	</div>
		    	</div>
		   </div>
		   <div class="layui-form-item">
			    <div class="layui-inline">
			    	<label class="layui-form-label">上级公司</label>
				    <div class="layui-input-inline">
						<select name="parentId" id="edit_selectParentComp" lay-search>
						</select>
				    </div>
			    </div>
		  	</div>
		    <div class="layui-form-item" id="edit_proCodeDiv" style="display:none">
		      	<label class="layui-form-label">关联项目（选填）</label>
		      	<div class="layui-input-inline">
		      		<select id="edit_selectProCode" name="projectCode" lay-search>
					</select>
		      	</div>
		    </div>
		    <div class="layui-form-item layui-hide">
		      <input type="button" lay-submit lay-filter="edit_form_submit" id="edit_form_submit" value="确认">
		    </div>
	  	</div>

	  	<!-- 详情窗口 -->
        <div class="layui-form" lay-filter="detail_form" id="detail_form" style="padding: 20px 30px 0 0;display:none">
	      	<div class="layui-form-item">
		    	<div class="layui-inline">
			      	<label class="layui-form-label">公司名称</label>
			      	<div class="layui-input-inline">
			        	<input type="text" name="compName" style="border:0px;width:270px;" readonly="readonly" class="layui-input">
			      	</div>
		      	</div>
		    </div>
		    <div class="layui-form-item">
		    	<div class="layui-inline">
		    		<label class="layui-form-label">法人姓名（选填）</label>
		      		<div class="layui-input-inline">
		        		<input type="text" name="legalPerson" style="border:0px;" readonly="readonly" class="layui-input">
		      		</div>
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <div class="layui-inline">
			    	<label class="layui-form-label">公司类型</label>
			    	<div class="layui-input-inline">
				   		<select name="types" disabled>
		              		<option value="">请选择-公司类型</option>
		              		<option value="1">总部公司</option>
		              		<option value="2">区域公司</option>
		              		<option value="3">项目公司</option>
	              		</select>
			    	</div>
		    	</div>
		   </div>
		   <div class="layui-form-item">
			    <div class="layui-inline">
			    	<label class="layui-form-label">上级公司</label>
				    <div class="layui-input-inline">
						<input type="text" name="parentCompName" style="border:0px;width:270px;" readonly="readonly" class="layui-input">
				    </div>
			    </div>
		  	</div>
		    <div class="layui-form-item" id="detail_projectNameDiv" style="display:none">
		      	<label class="layui-form-label">关联项目（选填）</label>
		      	<div class="layui-input-inline">
					<input type="text" name="projectName" style="border:0px;width:270px;" readonly="readonly" class="layui-input">
		      	</div>
		    </div>
		    <div class="layui-form-item layui-hide">
		      <input type="button" lay-submit lay-filter="detail_form_submit" id="detail_form_submit" value="确认">
		    </div>
	  	</div>

      </div>
    </div>
  </div>

  <script>
  	layui.config({
    	base: '${ctx}/resources/layuiadmin/' //静态资源所在路径
  	}).extend({
    	index: 'lib/index' //主入口模块
  	}).use(['index', 'table', 'set', 'transfer', 'laydate'], function(){
    	var $ = layui.$
    	,form = layui.form
    	,table = layui.table
    	,laydate = layui.laydate;

		//日期
		laydate.render({
			elem: '#orginfo-laydate-dates'
			, range: '~'
		});
 		// 正则校验
    	form.verify({
    		//验证汉字
    	    CHS: [
    	    	/^[\u0391-\uFFE5]+$/
    	    	,'只能输入汉字'
    	  	],
	    	//大于0的正整数
		  	intNumber:[
				/^[1-9]\d*$/
				,'请输入正确的数字'
		  	]
		});

    	// 表单
    	table.render({
      		elem: '#LAY-org-manage'
      		,url: basePath + '/org/queryDataByCondition' //请求数据接口
      		,cols: [[
        		{type: 'checkbox', fixed: 'left'}
        		,{field: 'orgCode', title: '公司ID',width:130}
        		,{field: 'compName', title: '公司名称',width:280}
        		,{field: 'types', title: '公司类型',width:100, templet: function(d){
        				if(d.types == '1'){
        					return '总部公司';
        				}else if(d.types == '2'){
        					return '区域公司';
        				}else if(d.types == '3'){
        					return '项目公司';
        				}
              		}
        		}
        		,{field: 'projectName', title: '关联项目',width:280, templet: function(d){
    					return d.projectName||global_null_tip;
          			}
        		}
        		,{field: 'parentCompName', title: '上级公司',width:170, templet: function(d){
	    				return d.parentCompName||global_null_tip;
	          		}
        		}
        		,{field: 'legalPerson', title: '公司法人',width:110, templet: function(d){
	  	      		  return d.legalPerson||global_null_tip;
	  	        	}
        		}
        		,{field: 'addTime', title: '创建时间',width:170, templet: function(d){
            		  	return layui.util.toDateString(d.addTime,"yyyy-MM-dd HH:mm:ss");
	              	}
	             }
        		,{field: 'state', title: '状态',width:80,fixed: 'right', templet: function (d) {
	        			if(d.state==1){
	          				return "启用中";
	          			}else{return '<span class="layui-badge layui-bg-cyan">已停用</span>' ;}
		        	}
 		    	}
        		,{title: '操作', width: 220, align:'center', fixed: 'right', templet: function(d){
      	  				var optStr ="";
      	  				<shiro:hasPermission name="VIEW_ORG">
      	  					optStr += '<a class="layui-btn layui-btn-xs" lay-event="view"><i class="layui-icon layui-icon-form"></i>查看</a>';
  	  	  				</shiro:hasPermission>
      	  				<shiro:hasPermission name="SAVE_ORG">
      	 					optStr += '<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>';
  	  	  				</shiro:hasPermission>
  	  	  				<shiro:hasPermission name="UPDATE_STATUS_ORG">
		  	  	  			if(d.state == 0){//状态为停用
      	 						optStr += '<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="use"><i class="layui-icon layui-icon-ok"></i>启用</a>';
		   	        		}else if(d.state == 1){//状态为启用
      	 						optStr += '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="freeze"><i class="layui-icon layui-icon-pause"></i>停用</a>';
		   	        		}
						</shiro:hasPermission>
			  		  	return optStr;
        			}
        		}
      			]]
      		,page: true
      		,limit: 10
    	});

    	<shiro:hasPermission name="LIST_ORG">
	    	//监听搜索
	    	form.on('submit(LAY-org-search)', function(data){
		      	//执行重载
		      	table.reload('LAY-org-manage', {page: {curr: 1},
		        	where: trimData(data)
		      	});
	    	});
	    	//重置清空
		    form.on('submit(LAY-user-back-reset)', function(data){
		    	reset_form('query-form');
		    	//额外处理select
				$("#query-form-state").val('');
				form.render();
		    });
    	</shiro:hasPermission>

    	// 监听操作列
    	table.on('tool(LAY-org-manage)', function(obj){
      		var data = obj.data;
      		if(obj.event === 'use'){
          		layer.confirm('确定启用？',{icon:3, title :'提示'}, function(index){
          			$.ajax({
  						type : 'post',
  						url : basePath + '/org/updateStatus?id=' + data.id,
  						success:function(result){
  							if(result.success){
  								table.reload('LAY-org-manage'); //数据刷新
  								layer.close(index);
  							}else{
  								layer.msg(result.msg,{icon: 7});
  				  			}
  						}
  					});
          		});
      		}else if(obj.event === 'freeze'){
          		layer.confirm('确定停用？',{icon:3, title :'提示'}, function(index){
          			$.ajax({
  						type : 'post',
  						url : basePath + '/org/updateStatus?id=' + data.id,
  						success:function(result){
  							if(result.success){
  								table.reload('LAY-org-manage'); //数据刷新
  								layer.close(index);
  							}else{
  								layer.msg(result.msg,{icon: 7});
  				  			}
  						}
  					});
          		});
      		} else if(obj.event === 'edit'){
      			$('#editAccountId').val(data.id);
      			$('#edit_selectParentComp').html('');
      	    	if(data.types == '1'){
      	    		form.render();
      	    	}else{
      				$.ajax({
      					type : "POST", //提交方式
      					url : "${ctx}/org/getOrgByTypes",//路径
      					data : {
      						"types" :data.types
      					},//数据，这里使用的是Json格式进行传输
      					success : function(result) {//返回数据根据结果进行相应的处理
      						if(result.flag==true){
      							var strBuffer = "";
      							layui.$.each(result.orgInfos, function(i,item){
      								strBuffer+= '<option value='+item.id+'  ';
      								if(item.id == data.parentId){
      									strBuffer+= 'selected';
      								}
      								strBuffer+= ' >'+item.compName+'</option>';
      					        });
      							$('#edit_selectParentComp').append(strBuffer);
      							form.render();
      						}else{
      							layer.msg('数据通信异常~',{icon: 0});
      						}
      					},
      					error:function (result){
      						layer.msg('数据通信异常~',{icon: 0});
      					}
      				});
      	    	}
      			form.val('edit_form',data); // 填充原值
      			if(data.types == '3'){
      				$('#edit_selectProCode').html('');
    	    		$.ajax({
    					type : "POST", //提交方式
    					url : "${ctx}/preProject/getAllPreProject",//路径
    					success : function(result) {//返回数据根据结果进行相应的处理
    						if(result.flag == true){
    							var strBuffer = "";
    							strBuffer+= '<option value="">请选择</option>';
    							if(data.projectCode != null && data.projectCode != '' && data.projectName != null && data.projectName != ''){
    								strBuffer+= '<option value="'+data.projectCode+'" selected>'+data.projectName+'</option>';
    							}
    							layui.$.each(result.preProjects, function(i,item){
    								strBuffer+= '<option value="'+item.proCode+'">'+item.proName+'</option>';
    					        });
    							$('#edit_selectProCode').append(strBuffer);
    							form.render();
    						}else{
    							layer.msg('数据通信异常~',{icon: 0});
    						}
    					},
    					error:function (result){
    						layer.msg('数据通信异常~',{icon: 0});
    					}
    				});
    	    		$("#edit_proCodeDiv").show();
      			}else{
    	    		$("#edit_proCodeDiv").hide();
      			}
      			layer.open({
            		type: 1
            		,title: '编辑公司'
            		,content: $('#edit_form')
            		,area: layui.admin.screen() < 2 ? ['80%', '520px'] : ['720px','520px']
            		,btn: ['确定', '取消']
            		,btnAlign: 'c'
            		,yes: function(index, layero){
          	  			var submitID = 'edit_form_submit'
          		  		,submit = layero.contents().find('#'+ submitID);
          	  			//监听提交
          	  			form.on('submit('+ submitID +')', function(data){
                			var field = data.field; //获取提交的字段
                			//提交 Ajax 成功后，静态更新表格中的数据
                			$.ajax({
                    			type : 'post',
  								url : basePath + '/org/save',
                    			data: field,
  								success:function(result){
  									if(result.success){
                						table.reload('LAY-org-manage'); //数据刷新
                						layer.close(index); //关闭弹层
  									}else{
  										layer.msg(result.msg,{icon: 7});
  					  				}
  								}
                			});
              			});
              		submit.trigger('click');
           		}
          	});
       	}else if(obj.event === 'view'){
  			form.val('detail_form',data); // 填充原值
  			if(data.types == '3'){
  				$('#detail_projectNameDiv').show();
  			}else{
  				$('#detail_projectNameDiv').hide();
  			}
  			layer.open({
        		type: 1
        		,title: '公司详情'
        		,content: $('#detail_form')
        		,area: layui.admin.screen() < 2 ? ['80%', '370px'] : ['560px','370px']
      		});
   		}
    	});

    // 按钮事件
    var active = {
      add: function(){
   	    clean_form("add_form");//清空表单
   	  	$("#add_selectTypes").val('');
   	  	$("#add_selectParentComp").val('');
		$('#add_selectParentComp').html('');
		$("#add_selectProCode").val('');
		$("#proCodeDiv").hide();
		form.render();
        layer.open({
          type: 1
          ,title: '添加公司'
          ,content: $('#add_form')
          ,area: layui.admin.screen() < 2 ? ['80%', '520px'] : ['720px','520px']
          ,btn: ['确定', '取消']
          ,btnAlign: 'c'
          ,yes: function(index, layero){
        	  var submitID = 'add_form_submit'
            	,submit = layero.contents().find('#'+ submitID);

              //监听提交
           	  form.on('submit('+ submitID +')', function(data){
              	var field = data.field; //获取提交的字段
              	//提交 Ajax 成功后，静态更新表格中的数据
              	$.ajax({
                  	type : 'post',
					url : basePath + '/org/save',
                  	data: field,
					success:function(result){
						if(result.success){
              				table.reload('LAY-org-manage'); //数据刷新
              				clean_form("add_form");//清空表单
              				layer.close(index); //关闭弹层
						}else{
							layer.msg(result.msg,{icon: 7});
					  	}
					}
              	});
            });
            submit.trigger('click');
          }
        });
      }
    }
    // data-type事件
    $('.layui-btn.layuiadmin-btn-admin').on('click', function(){
      var type = $(this).data('type');
      active[type] ? active[type].call(this) : '';
    });

  	//新增-公司类型select监听
    form.on('select(add_chooseParentComp)', function(data){
    	var types = data.value;
    	$('#add_selectParentComp').html('');
    	if(types == '1'){
    		form.render();
    	}else if(types != '1'){
			$.ajax({
				type : "POST", //提交方式
				url : "${ctx}/org/getOrgByTypes",//路径
				data : {
					"types" :types
				},//数据，这里使用的是Json格式进行传输
				success : function(result) {//返回数据根据结果进行相应的处理
					if(result.flag==true){
						var strBuffer = "";
						layui.$.each(result.orgInfos, function(i,item){
							strBuffer+= '<option value='+item.id+'>'+item.compName+'</option>';
				        });
						$('#add_selectParentComp').append(strBuffer);
						form.render();
					}else{
						layer.msg('数据通信异常~',{icon: 0});
					}
				},
				error:function (result){
					layer.msg('数据通信异常~',{icon: 0});
				}
			});
			if(types == '3'){
				$('#add_selectProCode').html('');
	    		$.ajax({
					type : "POST", //提交方式
					url : "${ctx}/preProject/getAllPreProject",//路径
					success : function(result) {//返回数据根据结果进行相应的处理
						if(result.flag == true){
							var strBuffer = "";
							strBuffer+= '<option value="">请选择</option>';
							layui.$.each(result.preProjects, function(i,item){
								strBuffer+= '<option value='+item.proCode+'>'+item.proName+'</option>';
					        });
							$('#add_selectProCode').append(strBuffer);
							form.render();
						}else{
							layer.msg('数据通信异常~',{icon: 0});
						}
					},
					error:function (result){
						layer.msg('数据通信异常~',{icon: 0});
					}
				});
	    		$("#proCodeDiv").show();
	    	}else{
	    		$("#proCodeDiv").hide();
	    	}
    	}
	});

  	//编辑-公司类型select监听
    form.on('select(edit_chooseParentComp)', function(data){
    	var types = data.value;
    	$('#edit_selectParentComp').html('');
    	if(types == '1'){
    		form.render();
    	}else if(types != '1'){
			$.ajax({
				type : "POST", //提交方式
				url : "${ctx}/org/getOrgByTypes",//路径
				data : {
					"types" :types
				},//数据，这里使用的是Json格式进行传输
				success : function(result) {//返回数据根据结果进行相应的处理
					if(result.flag==true){
						var strBuffer = "";
						layui.$.each(result.orgInfos, function(i,item){
							strBuffer+= '<option value='+item.id+'>'+item.compName+'</option>';
				        });
						$('#edit_selectParentComp').append(strBuffer);
						form.render();
					}else{
						layer.msg('数据通信异常~',{icon: 0});
					}
				},
				error:function (result){
					layer.msg('数据通信异常~',{icon: 0});
				}
			});
			if(types == '3'){
				$('#edit_selectProCode').html('');
	    		$.ajax({
					type : "POST", //提交方式
					url : "${ctx}/preProject/getAllPreProject",//路径
					success : function(result) {//返回数据根据结果进行相应的处理
						if(result.flag == true){
							var strBuffer = "";
							strBuffer+= '<option value="">请选择</option>';
							layui.$.each(result.preProjects, function(i,item){
								strBuffer+= '<option value='+item.proCode+'>'+item.proName+'</option>';
					        });
							$('#edit_selectProCode').append(strBuffer);
							form.render();
						}else{
							layer.msg('数据通信异常~',{icon: 0});
						}
					},
					error:function (result){
						layer.msg('数据通信异常~',{icon: 0});
					}
				});
	    		$("#edit_proCodeDiv").show();
	    	}else{
	    		$("#edit_proCodeDiv").hide();
	    	}
    	}
	});
  });

  	var $ = layui.$;
  	var layer = layui.layer;
  	/**校验公司名是否存在（新增时使用）*/
	function checkCompName(obj){
		var flag = true;
		$.post(
				"${ctx}/org/checkCompNameIsExist",
				{
					"compName":obj.value
				},
				function(data){//data: true 公司名已存在, false 公司名不存在
					if(data){//符合格式,到后台校验 输入的公司名,是否存在
						layui.layer.alert('该公司已存在',{icon: 0});
						flag = false;
					}
				});
		return flag;
	}
	/**校验公司名是否存在（编辑时使用）*/
	function checkNewCompName(obj){
		var $ = layui.$;
		var flag = true;
		$.post(
				"${ctx}/org/checkNewCompNameIsExist",
				{
					"compName":obj.value,
					"id":$("#editAccountId").val()
				},
				function(data){//data: true 手机号被占用, false 手机号未被占用
					if(data){//符合格式,到后台校验 输入的新手机号,是否被占用
						layui.layer.alert('该公司已存在',{icon: 0});
						flag = false;
					}

				});
		return flag;
	}

	//添加验证
  	function verify(obj,verType){
		var $ = layui.$;
		if(obj.value != null && obj.value != ''){
			$(obj).attr("lay-verify",verType);
		}else{
			$(obj).removeAttr("lay-verify");
		}
	}
  </script>
</body>
</html>

